import { createI18n } from 'vue-i18n'

import elementEnLocale from 'element-plus/lib/locale/lang/en'
import elementZhLocale from 'element-plus/lib/locale/lang/zh-cn'
import enlocale from './en'
import zhlocale from './zh'

const messages = {
  en: {
    ...elementEnLocale,
    ...enlocale
  },
  zh: {
    ...elementZhLocale,
    ...zhlocale
  }
}

const i18n = createI18n({
  locale: 'zh',
  fallbackLocale: 'en',
  messages
})

export default i18n
